
<!DOCTYPE html>
<html>
<head>

  <meta charset="UTF-8">
  <title>登录</title>
  <link rel="stylesheet" type="text/css" href="../js/style.css">
</head>
<body>
<div id="app">
  <div class="container">
    <h1>登录</h1>
    <form>
      <label for="username">用户名:</label>
      <input type="text" id="username" name="username">
      <label for="password">密码:</label>
      <input type="password" id="password" name="password">
      <input type="submit"  @click= "login()" value="登录">
    </form>
  </div>
</div>
</body>

<script>
  new Vue({
    el:"#app",
    data:{
      username :"",
      password:""
    },methods:{
      login(){
        axios.get("/emp/login").then(resp=>{
              this.date = resp.date.date;
                }
        )
      }

    },

    mounted(){
      axios.get("/emp/login").then(resp=>{
        this.data = resp.data.data;
      })
    }
  })
</script>

</html>